package xyz.chaobei.controller.page;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.Map;

@Controller
@RequestMapping("orgUser")
public class PageOrgUserController {

    /**
     * 用户管理页面
     *
     * @return
     */
    @RequestMapping("view")
    public String view() {
        return "system/orgUser";
    }

    /**
     * 用户新增
     *
     * @return
     */
    @GetMapping("add")
    public String toUserAdd() {
        return "system/userEdit";
    }

    /**
     * 编辑用户
     *
     * @return
     */
    @GetMapping("edit/{id}")
    public String toUserEdit(Map<String, Object> map, @PathVariable("id") Integer id) {
        map.put("id", id);
        return "system/userEdit";
    }

}
